#include "Actor.h"
#include "Game.h"
#include "TransicionLineal.h"

Actor::~Actor(void)
	{
	}

void Actor::mover( float x, float y, float tiempo )
	{
		if (tiempo > 0.f){
			xDestino = x;
			yDestino = y;

			g->getTransitionManager()->addTransicion(new TransicionLineal(this->x,x,tiempo));
			g->getTransitionManager()->addTransicion(new TransicionLineal(this->y,y,tiempo));
		}else{
			xDestino = this->x = x;
			yDestino = this->y = y;
		}
	}

bool Actor::enMovimiento()
	{
		return x != xDestino || y != yDestino;
	}

Actor::Actor( ID id, Actores::TipoActor t ):idActor(id),tipo(t),xDestino(0.f),yDestino(0.f),eliminar(false)
	{

	}